package com.zhangpingyang.jwttoken.map;

import java.util.Collection;
import java.util.Map;
import java.util.Set;

/**
 * @Author: Zhang Pingyang
 * @Date: 2019/11/21 14:18
 */
public interface MyMap<K, V> {

    int size();

    boolean isEmpty();

    boolean containsKey(Object key);

    boolean containsValue(Object value);

    V get(K key);

    V put(K key, V value);

    V remove(Object key);

    void putAll(MyMap<? extends K, ? extends V> map);

    void clear();

    Set<K> keySet();

    Collection<V> values();

    Set<MyMap.MyEntry<K, V>> entrySet();

    boolean equals(Object o);

    int hashCode();

    interface MyEntry<K, V> {
        K getKey();

        V getValue();

        V setValue(V value);

        boolean equals(Object o);

        int hashCode();
    }
}
